/**
 *
 * Copyright by Samuel Castro & Joaquim Fonseca, 2011
 * All Rights Reserved
 *
 * NOTES:
 * Please do not redistribute this plugin without my permission
 * Plugin made for private use only
 *
 */
package com.SySammy.SdCurrency.Prop;

import java.util.ArrayList;

public class CurrencyProperties {

    public static int initialMoney;
    public static int initialBones;
    public static int initialSlimes;
    public static String Currency;
    public static int maxLoanQnt;
    public static int maxLoanTime;
    public static int ScheduleRepTime;
    public static float usury;
    public static int cMultiplier;
    public static String Prisonowner;
    public static int Mana;
    public static int SetRecall;
    public static int RecallCost;
    public static ArrayList<Integer> initialValues = new ArrayList<Integer>();
    private static final String currencyDIR = "plugins/RPGmod/currency/";

    public static void loadCurrencyProps(boolean sCurr, int cSet) {
        String propFile = currencyDIR + "currency.prop";
        propertiesMethods prop = new propertiesMethods(propFile);
        prop.loadPro();

        if (sCurr) {
            prop.setInteger("cMultiplier", cSet);
        }
        initialMoney = prop.getInteger("Initial_Money", 100);
        initialBones = prop.getInteger("Initial_Bones", 10);
        initialSlimes = prop.getInteger("Initial_Slimes", 5);
        Currency = prop.getString("Currency", "Dinars");
        maxLoanQnt = prop.getInteger("MaxLoanQnt", 100000);
        maxLoanTime = prop.getInteger("MaxLoanTime", 7);
        ScheduleRepTime = prop.getInteger("ScheduleRepTime", 3);
        usury = prop.getfloat("usury(%)", 30);
        cMultiplier = prop.getInteger("cMultiplier", 100);
        Prisonowner = prop.getString("PrisonOwner", "Dergott");
        Mana = prop.getInteger("Mana", 331);
        SetRecall = prop.getInteger("SetRecall", 64);
        RecallCost = prop.getInteger("RecallCost", 25);
        prop.SavePro("== RPGmod Currency Properties ==");
        initialValues.add(initialMoney);
        initialValues.add(initialBones);
        initialValues.add(initialSlimes);
    }
}
